package edu.ccut.saturn.manager.bundles.core;

import java.util.List;

import edu.ccut.saturn.component.ComponentManager;
import edu.ccut.saturn.component.DefaultComponent;
import edu.ccut.saturn.component.IComponentInfo;
import edu.ccut.saturn.component.IParameterContext;
import edu.ccut.saturn.component.IParameterInfo;
import edu.ccut.saturn.component.impl.SaturnLogicComponentInfo;

public class GetNodeInfoNodeParamByFullKey extends DefaultComponent {
	@Override
	public void execute(IParameterContext parameterContext) throws Exception {
		
		String fullKey = (String)parameterContext.getParameterValue(0);
		String id = (String) parameterContext.getParameterValue(1);	
		
		IComponentInfo componentInfo = ComponentManager.getInstance().getComponentInfo(fullKey);	
		List<IParameterInfo> paramInfos = ((SaturnLogicComponentInfo)componentInfo).getNodeInfo(id).getParameterInfos();
		
		parameterContext.setParameter(2, paramInfos);
	}
}